package com.thinkgem.jeesite.modules.wx;


import com.thinkgem.jeesite.common.config.Global;
import com.thinkgem.jeesite.common.entity.Result;
import com.thinkgem.jeesite.common.persistence.Page;
import com.thinkgem.jeesite.common.utils.StringUtils;
import com.thinkgem.jeesite.common.web.BaseController;
import com.thinkgem.jeesite.modules.dinner.entity.shop.ResShop;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@Controller
@RequestMapping(value = "${adminPath}/wx")
public class WxApi extends BaseController {
    @RequestMapping(value = "getWxUserInfo")
    @ResponseBody
    public Result getWxUserInfo(HttpServletRequest request, HttpServletResponse response) {
//        String  code = request.getParameter("code");
//        if(StringUtils.isEmpty(code)){
//            return new Result().fail("code不能为空");
//        }
//        String url = Global.getWxCode2SessionUrl(code);
//        String res = HttpUtil.get(url);
        return new Result();
    }
}
